﻿@using System.Threading.Tasks
@using Magicodes.WeChat.Authorization
@using Magicodes.WeChat.Web.Mvc
@{
    ViewBag.CurrentPageName = WeChatPageNames.Common.WeChatUsers;
}
@section Styles
{
    <environment names="Development">
        <link rel="stylesheet" href="@ContentRootUrl/view-resources/Views/WeChatUsers/Index.css" asp-append-version="true" />
    </environment>

    <environment names="Staging,Production">
        <link rel="stylesheet" href="@ContentRootUrl/view-resources/Views/WeChatUsers/Index.min.css" asp-append-version="true" />
    </environment>
}

@section Scripts
{
    <environment names="Development">
        <script src="@ContentRootUrl/view-resources/Views/WeChatUsers/_CreateOrEditModal.js" asp-append-version="true"></script>
        <script src="@ContentRootUrl/view-resources/Views/WeChatUsers/Index.js" asp-append-version="true"></script>
    </environment>

    <environment names="Staging,Production">
        <script src="@ContentRootUrl/view-resources/Views/WeChatUsers/_CreateOrEditModal.min.js" asp-append-version="true"></script>
        <script src="@ContentRootUrl/view-resources/Views/WeChatUsers/Index.min.js" asp-append-version="true"></script>
    </environment>
}
<div class="row margin-bottom-5">
    <div class="col-xs-6">
        <div class="page-head">
            <div class="page-title">
                <h1>
                    <span>@L("WeChatUser")</span> <small>@L("WeChatUserHeaderInfo")</small>
                </h1>
            </div>
        </div>
    </div>
    <div class="col-xs-6 text-right">
        @if (IsGranted(WeChatPermissions.Roots_Tenants_WeChatUser_Create))
        {
            <button id="CreateNewWeChatUserButton" class="btn btn-primary blue"><i class="fa fa-plus"></i> @(L("CreateNew")+L("WeChatUser"))</button>
        }
    </div>
</div>

<div class="portlet light margin-bottom-0">
    <div class="portlet-body">
        <div id="WeChatUsersTable"></div>
    </div>
</div>